﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VideoLib.Config;
using Application = System.Windows.Application;
using ComboBox = System.Windows.Controls.ComboBox;
using RadioButton = System.Windows.Controls.RadioButton;

namespace VideoLib.Views
{
    /// <summary>
    /// SettingView.xaml 的交互逻辑
    /// </summary>
    public partial class SettingView : UserControl
    {
        public SettingView()
        {
            InitializeComponent();
            Loaded += SettingView_Loaded;
        }

        private void SettingView_Loaded(object sender, RoutedEventArgs e)
        {
            if (AppConfig.Instance.Theme == "Dark")
            {
                DarkRad.IsChecked = true;
            }
            else
            {
                LightRad.IsChecked = true;
            }
        }

        private void RadioButton_Checked(object sender, RoutedEventArgs e)
        {
            App.SetTheme((sender as RadioButton).Content.ToString());
        }
    }
}
